package models

import "time"

type Shop struct {
	Id           int64     `json:"id,omitempty" gorm:"primaryKey;autoIncrement"  form:"id"`
	TagId        uint      `json:"tag_id,omitempty"`
	Title        string    `json:"title,omitempty"`
	BannerImage  string    `json:"banner_image,omitempty"`
	GroupImages  string    `json:"group_images,omitempty" gorm:"type:text"`
	Price        float64   `json:"price,omitempty" gorm:"type:decimal(10,2)"`
	Routine      string    `json:"routine,omitempty"`
	CreatedTime  time.Time `json:"created_time,omitempty"`
	UpdatedTime  time.Time `json:"updated_time,omitempty"`
	Status       int8      `json:"status,omitempty"`
	Day          string    `json:"day,omitempty"`
	Set          string    `json:"set,omitempty"`
	Dissolution  string    `json:"dissolution,omitempty"`
	Age          string    `json:"age,omitempty"`
	StrokeImages string    `json:"stroke_images,omitempty" gorm:"type:text"`
	Tags         Tags      `json:"tags,omitempty" gorm:"foreignKey:TagId"`
	Costs        Costs     `json:"costs,omitempty" gorm:"foreignKey:ShopId"`
	Notice       Notice    `json:"notice,omitempty" gorm:"foreignKey:ShopId"`
	Hotel        []Hotel   `json:"hotel,omitempty" gorm:"foreignKey:ShopId"`
	ClickPage    string    `json:"click_page"`
}

func (Shop) TableName() string {
	return "fa_shop"
}
